﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Navigation;
using System.Windows.Shapes;

namespace ThePresenter.Network
{
	/// <summary>
	/// Interaction logic for ClientControl.xaml
	/// </summary>
	public partial class ClientControl : UserControl
	{
		public ClientControl()
		{
			InitializeComponent();
		}

		private void ConnectButton_Click(object sender, RoutedEventArgs e)
		{
			((Client)DataContext).Connect(this.IPBox.Text, int.Parse(this.PortBox.Text));
		}

		private void DisconnectButton_Click(object sender, RoutedEventArgs e)
		{
			((Client)DataContext).Disconnect();
		}
	}
}
